var app = getApp();
Page({
    data: {
      productInfo:{
        images:[
          {
            imageUrl: "../../source/image/avater.jpg",
          },
          {
            imageUrl: "../../source/image/avater.jpg",
          } 
        ],
        activityPrice:1000,
        ordinaryPrice:true,
        ordinaryPriceToFixed:1000,
        peopleNumber:100,
        activityTime:'2018-10-10',
        productName:'并夕夕mac pro',
        marketPrice:1000,
        ordinaryPrice:true,
        ordinaryPriceToFixed:10000,
        serviceTextArr:[
          {
            title:'一二一'
          },
          {
            title: '一二一'
          },
          {
            title: '一二一'
          }
        ],
        detailInfoArr:[
          "../../source/image/avater.jpg",
          "../../source/image/avater.jpg",
          "../../source/image/avater.jpg",
        ],
        onlinePayment:0,
        productShelves:2,
      },
    
    },
    onLoad: function (options) {
      var str = options.product_id;

      this.requestProductInfo(str);
    },

    requestProductInfo: function (productId){
          var that = this;
          wx.request({
            url: app.globalData.url + "GetProductInfo",
            header: {
              'content-type': 'application/x-www-form-urlencoded' //默认值
            },
            data: {
              "ProductId": productId,
            },
            method: 'GET',
            success: function (res) {
              console.log("requestProductInfo ======");
              console.log(res.data);
              that.setData({
                productInfo: res.data.ResultObject,
              });
            }
          })
      },

    onShow: function() {
       
    },
    onHide: function() {
       
    },
    onUnload: function() {
    },
    login: function() {
        this.getOrderCount(), this.getProductDetail();
    },
    getPageOptions: function(t) {
       
    },
    gochatDetail: function() {
       
    },
    getProductDetail: function() {
        
    },
    goMallHome: function() {
        var t = this.data.productParameter.card_id;
        wx.reLaunch({
          url: "/pages/personal/personal?card_id=" + t + "&nav_footer_active=1"
        });
    },
    consult: function() {
    }
});